package BufferedReader;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;

public class BufferedReaderTest {
    public static void main(String[] args)
    {
        String fileName = "d:\\Hello.txt";
        String line;
        try
        {
            BufferedReader in = new BufferedReader(new FileReader(fileName));
            line = in.readLine(); // 可以对换行符进行鉴别
            while(line != null)
            {
                System.out.println(line);
                line = in.readLine();
            }
            in.close();
        }
        catch(IOException e)
        {
            System.out.println(e.getMessage());
        }
    }
}
